/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package xowl.gmi.view;

/**
 *
 * @author Laurent WOUTERS
 */
public class Toolbox extends CollapsePanel {
    private javax.swing.JPanel content;
    
    public Toolbox(String description) {
        super(description);
        content = new javax.swing.JPanel();
        content.setOpaque(true);
        content.setLayout(new javax.swing.BoxLayout(content, javax.swing.BoxLayout.Y_AXIS));
        this.setContent(content);
    }
    
    public void addToolboxElement(ToolboxElement elem) {
        elem.setAlignmentX(java.awt.Component.LEFT_ALIGNMENT);
        content.add(elem);
        this.revalidate();
        this.repaint();
    }
}
